package main

import (
    "encoding/json"
//    "fmt"
    "io/ioutil"
    "net/http"
)
//const url = "https://restapi.amap.com/v3/ip?key=0113a13c88697dcea6a445584d535837";

type PVR struct {
    Status string
    Info string
}

func GetPVR(url string) (* PVR) {
    resp, err := http.Get(url)
    if err != nil {
	// handle error
    }
    defer resp.Body.Close()
    body, err := ioutil.ReadAll(resp.Body)
    var pvr PVR
    json.Unmarshal([]byte(body), &pvr)
    return &pvr
}
/*
func main(){
    c := GetPVR(url)
    fmt.Println(c)
    fmt.Println(c.City)
}*/
